package com.hymjweb.demo.hymj.customer_manage.freight_agreement.ticket_price.controller;

import com.hymjweb.demo.framework.sys.BaseController;
import com.hymjweb.demo.hymj.customer_manage.freight_agreement.ticket_price.service.BCustomerFreightTicketPriceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.Map;

@Controller
@RequestMapping("/pages/customer_manage/freight_agreement/ticket_price")
public class BCustomerFreightTicketPriceController extends BaseController {

    @Autowired
    private BCustomerFreightTicketPriceService bCustomerFreightTicketPriceService;

    @RequestMapping("/queryTicketPriceNoPageList")
    @ResponseBody
    public Object queryTicketPriceNoPageList(@RequestParam(required = false) Map param) throws Exception {
        if(param != null){
            return bCustomerFreightTicketPriceService.queryTicketPriceNoPageList(param);
        } else{
            throw new Exception("查询参数错误");
        }
    }

    @RequestMapping("/batchSave")
    @ResponseBody
    public Object batchSave(@RequestBody Map<String,Object> param) throws Exception {
        if(param != null && param.size()>0){
            return bCustomerFreightTicketPriceService.batchSave(param);
        } else{
            throw new Exception("查询参数错误");
        }
    }

}
